package cn.always.xiajia.admin.oauth2.entity;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import cn.always.xiajia.framework.mybatis.core.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 客服端编码
 * 
 * @author xgj
 *
 */
@TableName(value = "sys_oauth2_client", autoResultMap = true)
@KeySequence("sys_oauth2_client_seq")
@Data
@EqualsAndHashCode(callSuper = true) // 比较对象
@Accessors(chain = true) // set返回对象
@NoArgsConstructor
@AllArgsConstructor
public class OAuth2Client extends BaseEntity {

	private static final long serialVersionUID = -4628064306775491496L;

	/**
	 * OAuth2 客服端 ID
	 */
	@TableId
	protected Long id;

	/**
	 * 客户端编号
	 */
	protected String clientId;

	/**
	 * 客户端密钥
	 */
	protected String secret;

	/**
	 * 应用描述
	 */
	protected String description;

	/**
	 * 帐号状态（0正常 1停用）
	 */
	protected String status;

	/**
	 * 访问令牌的有效期
	 */
	protected Integer accessTokenValiditySeconds;

	/**
	 * 刷新令牌的有效期
	 */
	protected Integer refreshTokenValiditySeconds;

}
